
  export function  formatDateTime(input) {
    // 处理毫秒部分并转换为UTC时间
    const isoString = input.replace(/\.(\d{3})\d*/, '.$1') + 'Z';
    const date = new Date(isoString);
    if (isNaN(date)) {
      throw new Error('Invalid date string');
    }
    
    // 提取UTC时间各部分并补零
    const year = date.getUTCFullYear();
    const month = String(date.getUTCMonth() + 1).padStart(2, '0');
    const day = String(date.getUTCDate()).padStart(2, '0');
    const hours = String(date.getUTCHours()).padStart(2, '0');
    const minutes = String(date.getUTCMinutes()).padStart(2, '0');
    const seconds = String(date.getUTCSeconds()).padStart(2, '0');
    return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  }
  